﻿<%@ Page Title="" Language="VB" MasterPageFile="~/Administrator/MasterPage.master" AutoEventWireup="false" CodeFile="frmImportLoginPic.aspx.vb" Inherits="Administrator_frmImportLoginPic" %>

<%@ Register Assembly="DevExpress.Web.v14.1, Version=14.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">


   
            <script type="text/javascript">


     $(document).ready(function () {
         Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
         $("input[id$=txtStartDate]").datepicker($.extend({}, $.datepicker.regional['th'], {
             yearAddToDisplay: 543,
             dateFormat: 'dd/mm/yy 00:00:00',
             showOn: "button",
             buttonImage: "../img/calendar.gif",
             buttonImageOnly: true
         }));
         $("input[id$=txtEndDate]").datepicker($.extend({}, $.datepicker.regional['th'], {
             yearAddToDisplay: 543,
             dateFormat: 'dd/mm/yy 23:59:59',
             showOn: "button",
             buttonImage: "../img/calendar.gif",
             buttonImageOnly: true
         }));
         $(".inputDate").datepicker($.extend({}, $.datepicker.regional['th'], {
             yearAddToDisplay: 543,
             dateFormat: 'dd/mm/yy',
             showOn: "button",
             buttonImage: "../img/calendar.gif",
             buttonImageOnly: true
         }));
         function EndRequestHandler(sender, args) {
             $("input[id$=txtStartDate]").datepicker($.extend({}, $.datepicker.regional['th'], {
                 yearAddToDisplay: 543,
                 dateFormat: 'dd/mm/yy 00:00:00',
                 showOn: "button",
                 buttonImage: "../img/calendar.gif",
                 buttonImageOnly: true
             }));
             $("input[id$=txtEndDate]").datepicker($.extend({}, $.datepicker.regional['th'], {
                 yearAddToDisplay: 543,
                 dateFormat: 'dd/mm/yy 23:59:59',
                 showOn: "button",
                 buttonImage: "../img/calendar.gif",
                 buttonImageOnly: true
             }));
             $(".inputDate").datepicker($.extend({}, $.datepicker.regional['th'], {
                 yearAddToDisplay: 543,
                 dateFormat: 'dd/mm/yy',
                 showOn: "button",
                 buttonImage: "../img/calendar.gif",
                 buttonImageOnly: true
             }));
         }

     });

     var hasSubmitted = 0;
     function NoDoubleSubmit() {
         var divMsg = document.getElementById('Processing');
         if (hasSubmitted == 0) {
             hasSubmitted = 0;
             divMsg.style.display = 'block';
             return true;
         }
         return false;
     }

    </script>
            <table class="control" style="width:100%;">
                <tr>
                    <td align="right" width="150">
                        ชื่อรูปภาพ :
                    </td>
                    <td align="left" style="height: 26px; ">
                        <asp:HiddenField ID="hdfUploadID" runat="server" />
                        <asp:TextBox ID="txtPictureName" runat="server" CssClass="control" Height="20px" 
                            Width="160px" MaxLength="30" BackColor="#FFCCCC"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        ไฟล์ :
                    </td>
                    <td align="left">
                        <input id="FileUpload1" runat="Server" class="control" 
                            style="width: 220px; background-color: #FFCCCC;" type="file" />
                        <asp:TextBox ID="TxtPathFileUpload" runat="server" Enabled="False" 
                            Visible="False" Width="335px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        คำอธิบาย :
                    </td>
                    <td align="left" style="height: 26px; ">
                        <asp:TextBox ID="txtDesc" runat="server" CssClass="control" Height="20px" 
                            Width="250px" MaxLength="120"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        วันที่ใช้งาน :
                    </td>
                    <td align="left" style="height: 26px; ">
                        <asp:TextBox ID="txtStartDate" runat="server" MaxLength="19"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        วันที่เลิกใช้งาน :
                    </td>
                    <td align="left" style="height: 26px; ">
                        <asp:TextBox ID="txtEndDate" runat="server" MaxLength="19"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        &nbsp;</td>
                    <td align="right">
                        &nbsp;<asp:Button ID="btnUpload" runat="server" CssClass="control" Text="อัพโหลด" 
                            Width="80px" />
                        &nbsp;<asp:Button ID="btnModify" runat="server" CssClass="control" Text="แก้ไข" 
                            Width="80px" />
                        &nbsp;<asp:Button ID="btnDelete" runat="server" CssClass="control" Text="ลบ" 
                            Width="80px" />
                        &nbsp;<asp:Button ID="btnCancel" runat="server" CssClass="control" Text="เคลียร์" 
                            Width="80px" />
                    </td>
                </tr>
                <tr>
                    <td align="center" colspan="2">
                       <SPAN id="Processing" style="DISPLAY: none">
 <img src="../img/icon/ajax-loader.gif" alt="Please wait" />
            กรุณารอสักครู่ อยู่ระหว่างดำเนินการ...
  </SPAN></td>
                </tr>
                <tr>
                    <td align="center" colspan="2">
            <asp:GridView ID="grdImportList" runat="server" AllowPaging="true"
                AutoGenerateColumns="False" CellPadding="4" CssClass="control" 
                ForeColor="#333333" Width="100%">
                <FooterStyle BackColor="White" Font-Bold="True" ForeColor="#333333" />
                <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
                <PagerSettings Mode="NumericFirstLast" />
                <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" CssClass="cssPager" />
                <SelectedRowStyle BackColor="#FFFFCC" Font-Bold="True" ForeColor="Navy" />
                <HeaderStyle BackColor="#E38120" Font-Bold="True" ForeColor="White" />
                <AlternatingRowStyle BackColor="White" />
                <Columns>
                    <asp:CommandField ButtonType="Image" SelectImageUrl="~/img/icon/select_icon.gif"
                        ShowSelectButton="True">
                        <ItemStyle Width="30px" HorizontalAlign="Center" />
                    </asp:CommandField>
                    <asp:BoundField DataField="upload_date" HeaderText="วันที่นำเข้าระบบ" DataFormatString="{0:dd/MM/yyyy HH:mm:ss}" ReadOnly="true">
                    <ItemStyle Width="100px" />
                    </asp:BoundField>
                    <asp:BoundField DataField="info_name" HeaderText="ชื่อรูปภาพ" ReadOnly="true">
                    <ItemStyle HorizontalAlign="Left" />
                    </asp:BoundField>
                    <asp:BoundField DataField="file_name" HeaderText="ชื่อไฟล์" ReadOnly="true">
                    <ItemStyle HorizontalAlign="Left" />
                    </asp:BoundField>
                    <asp:BoundField DataField="file_desc" HeaderText="คำอธิบาย">
                    <ItemStyle HorizontalAlign="Left" />
                    </asp:BoundField>
                    <asp:BoundField DataField="active_date" HeaderText="วันที่ใช้งาน" DataFormatString="{0:dd/MM/yyyy HH:mm:ss}">
                    <ItemStyle HorizontalAlign="Center" Width="100px" />
                    </asp:BoundField>
                    <asp:BoundField DataField="expire_date" HeaderText="วันที่เลิกใช้งาน" DataFormatString="{0:dd/MM/yyyy HH:mm:ss}">
                    <ItemStyle HorizontalAlign="Center" Width="100px" />
                    </asp:BoundField>
                    <asp:TemplateField HeaderText="แสดง">
                        <ItemTemplate>
                            <asp:HiddenField ID="hdfID" runat="server" Value='<%#eval("ID")%>' />
                            <asp:HyperLink ID="linkImg" runat="server" ImageUrl="~/img/icon/icon_view.gif" Target="_blank" />
                        </ItemTemplate>
                        <ItemStyle Width="40px" HorizontalAlign="Center" />
                    </asp:TemplateField>
                    <asp:ButtonField ButtonType="Image" ImageUrl="~/img/icon/iCopy.gif"
                         HeaderText="สำเนา" CommandName="Copy">
                        <ItemStyle Width="40px" HorizontalAlign="Center" />
                    </asp:ButtonField>
                </Columns>
            </asp:GridView>
                    </td>
                </tr>
                <tr>
                    <td align="right" colspan="2">
                        &nbsp;</td>
                </tr>
            </table>
</asp:Content>

